import { getAction, postQueryAction, postAction, postQueryOtherAction, getOtherAction } from '@/api/manage'
import {putAction} from "./manage"; // deleteAction, putAction, httpAction
// import { param } from 'jquery'
// import Vue from 'vue'

// 授权登录
const author = params => postQueryOtherAction('/wecom/getOpen_id', params)
//获取小程序的access_token
const getAccessToken = params => getOtherAction('/wecom/getAccessToken', params)
// 获取所有项目
const getAllProject = params => getAction('/yw_project/ywProject/listByUserId', params)
//获取Ticket
const getTicket = params => postQueryOtherAction('/wecom/getJSApiTicket', params)


//丹能销售订单-列表
const dnGetTaskList = params => getAction('/wecom/seorderlist', params)
//丹能销售订单-详情
const dnGetDetail = params => getAction('/wecom/queryYwXsorderEntryByMainId', params)

//拓天销售订单-列表
const ttGetTaskList = params => getAction('/wecom/ttseorderlist', params)
//拓天销售订单-详情
const ttGetDetail = params => getAction('/wecom/ttqueryYwXsorderEntryByMainId', params)

//丹能库存查询-列表
const dngetItem1 = params =>getAction('/wecom/dngetItem1', params)

//拓天库存查询-列表
const ttgetItem1 = params =>getAction('/wecom/ttgetItem1', params)

//丹能每日发货-列表
const dailySeoutStocklist = params =>getAction('/yw_outstock/ywOutstock/dailySeoutStocklist', params)
//丹能每日发货-领料明细
const dailySeoutStockllDetail = params =>getAction('/yw_outstock/ywOutstock/dailySeoutStockllDetail', params)

//拓天每日发货-列表
const ttdailySeoutStocklist =  params => getAction('/yw_outstock/ywOutstock/ttdailySeoutStocklist', params)


//丹能销售出库列表
const dnxsckQywxList = params => getAction('/wecom/dnxsckQywxList', params)

//销售销售出库列表
const ttxsckQywxList = params => getAction('/wecom/ttxsckQywxList', params)

export {
  ttxsckQywxList,
  dnxsckQywxList,
  ttdailySeoutStocklist,
  dailySeoutStockllDetail,
  dailySeoutStocklist,
  ttgetItem1,
  dngetItem1,
  dnGetDetail,
  ttGetDetail,
  dnGetTaskList,
  ttGetTaskList,
  getAccessToken,
  getTicket,
  author,
  getAllProject,
}
